﻿cmake_minimum_required(VERSION 3.16)

project(CameraHikVision VERSION 2.0.0 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(HIK_MVS REQUIRED)
#qt_standard_project_setup()
add_library(CameraHikVision MODULE
    ../Camera_global.h
    CameraHikVision.cpp
    CameraHikVision.h
    HikVisionCameraImageProcessing.cpp
    ../IndustryCamera.h
    DialogCameraSetup.h
    DialogCameraSetup.cpp
    DialogCameraSetup.ui
    CameraFactory.h
    CameraFactory.cpp
)
target_link_libraries(CameraHikVision PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia CameraCommon ${HIK_MVS_LIBRARIES})
target_include_directories(CameraHikVision PUBLIC ${HIK_MVS_INCLUDE_DIRS})
target_include_directories(CameraHikVision PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(CameraHikVision PRIVATE CAMERA_LIBRARY)

